package com.xmj.ms.service.impl;

import com.xmj.ms.domain.PaymentMethods;
import com.xmj.ms.mapper.PaymentMethodsMapper;
import com.xmj.ms.service.IPaymentMethodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 支付Service业务层处理
 *
 * @author ohh
 * @date 2024-04-21
 */
@Service
public class PaymentMethodsServiceImpl implements IPaymentMethodsService
{
    @Autowired
    private PaymentMethodsMapper paymentMethodsMapper;

    /**
     * 查询支付
     *
     * @param paymentmethodID 支付主键
     * @return 支付
     */
    @Override
    public PaymentMethods selectPaymentMethodsByPaymentmethodID(Long paymentmethodID)
    {
        return paymentMethodsMapper.selectPaymentMethodsByPaymentmethodID(paymentmethodID);
    }

    /**
     * 查询支付列表
     *
     * @param paymentMethods 支付
     * @return 支付
     */
    @Override
    public List<PaymentMethods> selectPaymentMethodsList(PaymentMethods paymentMethods)
    {
        return paymentMethodsMapper.selectPaymentMethodsList(paymentMethods);
    }

    /**
     * 新增支付
     *
     * @param paymentMethods 支付
     * @return 结果
     */
    @Override
    public int insertPaymentMethods(PaymentMethods paymentMethods)
    {
        return paymentMethodsMapper.insertPaymentMethods(paymentMethods);
    }

    /**
     * 修改支付
     *
     * @param paymentMethods 支付
     * @return 结果
     */
    @Override
    public int updatePaymentMethods(PaymentMethods paymentMethods)
    {
        return paymentMethodsMapper.updatePaymentMethods(paymentMethods);
    }

    /**
     * 批量删除支付
     *
     * @param paymentmethodIDs 需要删除的支付主键
     * @return 结果
     */
    @Override
    public int deletePaymentMethodsByPaymentmethodIDs(Long[] paymentmethodIDs)
    {
        return paymentMethodsMapper.deletePaymentMethodsByPaymentmethodIDs(paymentmethodIDs);
    }

    /**
     * 删除支付信息
     *
     * @param paymentmethodID 支付主键
     * @return 结果
     */
    @Override
    public int deletePaymentMethodsByPaymentmethodID(Long paymentmethodID)
    {
        return paymentMethodsMapper.deletePaymentMethodsByPaymentmethodID(paymentmethodID);
    }
}
